# 创建一个字典
my_dict = {
    1: "one",
    "two": 2,
    (3,): "three"
}

# 访问字典中的值
print(my_dict[1])  
print(my_dict["two"])  
print(my_dict[(3,)])  

# 检查键是否具有__hash__()和__eq__()方法
keys = [1, "two", (3,)]
for key in keys:
    assert hasattr(key, '__hash__')
    assert hasattr(key, '__eq__')



